package com.nabi.library.contents.elements.text
{
	import com.yzi.utilitys.FontUtility;
	
	import flash.text.TextFormat;

	public class TextFormatFactory
	{
		public function TextFormatFactory()
		{
			throw new Error("Static Class.");
		}
		
		static public function Create($fontName:String, $fontColor:uint = 0x000000, $fontSize:int = 12): TextFormat
		{
			var result:TextFormat = new TextFormat();
			if(FontUtility.IsExistFont($fontName) == false) $fontName = FontUtility.GetDefaultEmbedFontName();
			
			result.font = $fontName;
			result.color = $fontColor;
			result.size = $fontSize;
			
			return result;
		}
	}
}